/* Copyright (C) 2011-2012 SBA Research gGmbh

   This file is part of the Slibc Library.

   The Slibc Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The Slibc library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the Slibc Library; if not, see
   <http://www.gnu.org/licenses/>.  
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "slibc.h"

void slibc_call_constraint_handler(const char *msg,
								   const char *func,
								   const char *file,
								   unsigned line)
{
	ConstraintHandlerDetails details;
	details.function = func;
	details.file = file;
	details.line = line;

	//XXX: something better than EINVAL?
	slibc_constraint_handler(msg, &details, EINVAL);
}


